package com.example.servicea.datasources.service.impl;

import com.baomidou.mybatisplus.mapper.SqlRunner;
import com.example.servicea.datasources.service.CommonService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 *@Author hutu
 *@Desc 公共sql查询
 *@Date 2018/2/2 11:24
 */
@Service
public class CommonServiceImpl implements CommonService {

    @Override
    public List selectList(String sql, Object... args) {
//        sql = "SELECT dbo.t_upms_user.name FROM dbo.t_upms_user WHERE t_upms_user.id = {0}";
        List<Map<String, Object>> list = SqlRunner.DEFAULT.selectList(sql, args);
        return list;
    }
}
